package Netzwerkprogrammierung.g1.RMI;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class RMIServer {


	public static void main(String[] args) throws RemoteException {
		LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
		
		RMIRemoteInterfaceImpl multiplyer = new RMIRemoteInterfaceImpl();
		RMIRemoteInterface stub = 
				(RMIRemoteInterface)UnicastRemoteObject.exportObject(multiplyer,0);
		
		Registry registry = LocateRegistry.getRegistry();
		registry.rebind("Multiplyer", stub);
		
		System.out.println("Multiplyer-Dienst angemeldet!");		

	}

}
